﻿'功能說明：系統主網址下的主要內容區，分menu,Split及MainPage1
'建立人員: andy
'建立日期：2011/1/31
'****************************************************
Imports System.Data
Partial Class WebForm_Main_MainPage1
    Inherits System.Web.UI.Page
    Public Sub RequestLogin()
        Dim logid As String = Context.User.Identity.Name
        logid = logid.Substring(logid.IndexOf("\") + 1)

        Dim bbl As OAMS.BBL.UsersBBL = New OAMS.BBL.UsersBBL()
        Dim dt As DataTable = bbl.GetUsersLogin(logid, "telecom")

        Session("UID") = dt.Rows(0)("UserID").ToString
        Session("UserName") = dt.Rows(0)("UserName").ToString
        Session("ActualUID") = dt.Rows(0)("UserID").ToString
        Session("ActualUserName") = dt.Rows(0)("UserName").ToString

        Session("dbName") = "telecom"

        Dim bbl1 As OAMS.BBL.UsersBBL = New OAMS.BBL.UsersBBL()
        Session("GlobalLanguage") = "zh-tw"

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session("UID") = Nothing Then
            RequestLogin()
        End If
    End Sub
End Class
